<?php
class Answer_Component_Controller_Admincp_Action extends Phpfox_Component {
    public function process() {
        $sLink = "admincp.answer.action";
        $aPoints = Phpfox::getService('answer.action')->getAll();
        if($aVal = $this->request()->getArray('val'))
        {
            if (Phpfox::getService('answer.action')->saveDatabase($aVal))
            {
                $this->url()->send($sLink, array(), Phpfox::getPhrase('answer.update_successfully'));
            }
        }
        $this->template()
            ->setTitle(Phpfox::getPhrase('answer.action'))
            ->setBreadcrumb(Phpfox::getPhrase('answer.action'))
            ->setHeader(array(
            'actions.js' => 'module_answer')
            )
            ->assign('aPoints', $aPoints);
    }
}